.class public Lcom/instagram/creation/video/mediarecorder/e;
.super Lcom/instagram/creation/video/mediarecorder/p;
.source "GyroscopeEventListener.java"

# interfaces
.implements Landroid/hardware/SensorEventListener;


# static fields
.field private static final a:[B


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 19
    const/4 v0, 0x4

    new-array v0, v0, [B

    fill-array-data v0, :array_0

    sput-object v0, Lcom/instagram/creation/video/mediarecorder/e;->a:[B

    return-void

    nop

    :array_0
    .array-data 0x1
        0x67t
        0x79t
        0x72t
        0x6ft
    .end array-data
.end method

.method public constructor <init>(Lcom/instagram/creation/video/mediarecorder/m;)V
    .locals 2
    .parameter

    .prologue
    .line 23
    sget-object v0, Lcom/instagram/creation/video/mediarecorder/e;->a:[B

    const/16 v1, 0x320

    invoke-direct {p0, p1, v0, v1}, Lcom/instagram/creation/video/mediarecorder/p;-><init>(Lcom/instagram/creation/video/mediarecorder/m;[BI)V

    .line 24
    return-void
.end method


# virtual methods
.method public onAccuracyChanged(Landroid/hardware/Sensor;I)V
    .locals 0
    .parameter "sensor"
    .parameter "accuracy"

    .prologue
    .line 28
    return-void
.end method

.method public onSensorChanged(Landroid/hardware/SensorEvent;)V
    .locals 5
    .parameter "event"

    .prologue
    .line 31
    invoke-virtual {p0}, Lcom/instagram/creation/video/mediarecorder/e;->a()Lcom/instagram/creation/video/mediarecorder/u;

    move-result-object v0

    if-nez v0, :cond_0

    .line 32
    const-string v0, "GyroscopeEventListener"

    const-string v1, "failure in constructor, or we finished writing for gyro data."

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 45
    :goto_0
    return-void

    .line 35
    :cond_0
    iget-wide v0, p1, Landroid/hardware/SensorEvent;->timestamp:J

    long-to-double v0, v0

    sget-object v2, Lcom/instagram/creation/video/j/g;->a:Lcom/instagram/creation/video/j/g;

    sget-object v3, Lcom/instagram/creation/video/j/g;->d:Lcom/instagram/creation/video/j/g;

    invoke-static {v0, v1, v2, v3}, Lcom/instagram/creation/video/j/f;->a(DLcom/instagram/creation/video/j/g;Lcom/instagram/creation/video/j/g;)D

    move-result-wide v0

    .line 37
    sget-object v2, Lcom/instagram/creation/video/j/g;->d:Lcom/instagram/creation/video/j/g;

    invoke-static {v0, v1, v2}, Lcom/instagram/creation/video/j/f;->a(DLcom/instagram/creation/video/j/g;)D

    move-result-wide v0

    .line 38
    const-string v2, "GyroscopeEventListener"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "gyro timestamp: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v0, v1}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 39
    const/16 v2, 0x20

    invoke-static {v2}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v2

    .line 40
    iget-object v3, p1, Landroid/hardware/SensorEvent;->values:[F

    const/4 v4, 0x0

    aget v3, v3, v4

    float-to-double v3, v3

    invoke-virtual {v2, v3, v4}, Ljava/nio/ByteBuffer;->putDouble(D)Ljava/nio/ByteBuffer;

    .line 41
    iget-object v3, p1, Landroid/hardware/SensorEvent;->values:[F

    const/4 v4, 0x1

    aget v3, v3, v4

    float-to-double v3, v3

    invoke-virtual {v2, v3, v4}, Ljava/nio/ByteBuffer;->putDouble(D)Ljava/nio/ByteBuffer;

    .line 42
    iget-object v3, p1, Landroid/hardware/SensorEvent;->values:[F

    const/4 v4, 0x2

    aget v3, v3, v4

    float-to-double v3, v3

    invoke-virtual {v2, v3, v4}, Ljava/nio/ByteBuffer;->putDouble(D)Ljava/nio/ByteBuffer;

    .line 43
    invoke-virtual {v2, v0, v1}, Ljava/nio/ByteBuffer;->putDouble(D)Ljava/nio/ByteBuffer;

    .line 44
    invoke-virtual {p0}, Lcom/instagram/creation/video/mediarecorder/e;->a()Lcom/instagram/creation/video/mediarecorder/u;

    move-result-object v0

    invoke-virtual {v2}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v1

    invoke-virtual {v2}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v2

    array-length v2, v2

    invoke-virtual {v0, v1, v2}, Lcom/instagram/creation/video/mediarecorder/u;->a([BI)V

    goto :goto_0
.end method
